import 'package:meta/meta.dart';

const defaultAverageRepeats = 20;

class Summary {
  final int sampleTimes;
  int successTimes;

  int get failureTimes {
    return sampleTimes - successTimes;
  }

  double get availableRatio {
    return successTimes / sampleTimes;
  }

  double get unavailableRatio {
    return failureTimes / sampleTimes;
  }

  // ignore: non_constant_identifier_names
  final int P90;

  // ignore: non_constant_identifier_names
  final int P50;
  final int avg;
  List<Exception> exceptions;

  // ignore: non_constant_identifier_names
  Summary(
      // ignore: non_constant_identifier_names
          {@required this.P90,
        // ignore: non_constant_identifier_names
        @required this.P50,
        @required this.avg,
        @required this.sampleTimes,
        this.successTimes,
        this.exceptions});
}
